package com.daniel.oop;

/**
 * 详细说明
 *
 * @author Daniel
 * @version V1.0
 * @date 2020/5/12 10:04
 */
public class Application {
	public static void main(String[] args) {
		// 没有名字初始化类，不用将实例保存到变量中
		new Apple().eat();

		IUserService service = new IUserService() {

			@Override
			public void hello() {

			}
		};

		service.hello();
	}
}

class Apple {
	public void eat() {

	}
}


interface IUserService {
	void hello();
}
